package fun.diaoer.config.security;

import java.util.Collection;
import java.util.List;

import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.GrantedAuthority;

import fun.diaoer.entity.DISysPermission;

/**
 * set 用户信息
 * @author xiaodiannao
 *
 */
public class DiaoerUsernamePasswordAuthenticationToken extends UsernamePasswordAuthenticationToken {
	
	private static final long serialVersionUID = 1L;
	
	private List<DISysPermission> perms;
	
	public DiaoerUsernamePasswordAuthenticationToken(Object principal, Object credentials,Collection<? extends GrantedAuthority> authorities,
			List<DISysPermission> perms) {
		super(principal, credentials,authorities);
		this.perms = perms;
	}
	

	public DiaoerUsernamePasswordAuthenticationToken(Object principal, Object credentials,Collection<? extends GrantedAuthority> authorities) {
		super(principal, credentials,authorities);
	}


	public DiaoerUsernamePasswordAuthenticationToken(Object principal, Object credentials) {
		super(principal, credentials);
	}



	public List<DISysPermission> getPerms() {
		return perms;
	}



	public void setPerms(List<DISysPermission> perms) {
		this.perms = perms;
	}
	
	

}
